package com.ruoyi.documents.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.documents.mapper.DocCompletionMapper;
import com.ruoyi.documents.domain.DocCompletion;
import com.ruoyi.documents.service.IDocCompletionService;

/**
 * 竣工文件Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-21
 */
@Service
public class DocCompletionServiceImpl implements IDocCompletionService 
{
    @Autowired
    private DocCompletionMapper docCompletionMapper;

    /**
     * 查询竣工文件
     * 
     * @param id 竣工文件主键
     * @return 竣工文件
     */
    @Override
    public DocCompletion selectDocCompletionById(Long id)
    {
        return docCompletionMapper.selectDocCompletionById(id);
    }

    /**
     * 查询竣工文件列表
     * 
     * @param docCompletion 竣工文件
     * @return 竣工文件
     */
    @Override
    public List<DocCompletion> selectDocCompletionList(DocCompletion docCompletion)
    {
        return docCompletionMapper.selectDocCompletionList(docCompletion);
    }

    /**
     * 新增竣工文件
     * 
     * @param docCompletion 竣工文件
     * @return 结果
     */
    @Override
    public int insertDocCompletion(DocCompletion docCompletion)
    {
        docCompletion.setCreateTime(DateUtils.getNowDate());
        return docCompletionMapper.insertDocCompletion(docCompletion);
    }

    /**
     * 修改竣工文件
     * 
     * @param docCompletion 竣工文件
     * @return 结果
     */
    @Override
    public int updateDocCompletion(DocCompletion docCompletion)
    {
        docCompletion.setUpdateTime(DateUtils.getNowDate());
        return docCompletionMapper.updateDocCompletion(docCompletion);
    }

    /**
     * 批量删除竣工文件
     * 
     * @param ids 需要删除的竣工文件主键
     * @return 结果
     */
    @Override
    public int deleteDocCompletionByIds(Long[] ids)
    {
        return docCompletionMapper.deleteDocCompletionByIds(ids);
    }

    /**
     * 删除竣工文件信息
     * 
     * @param id 竣工文件主键
     * @return 结果
     */
    @Override
    public int deleteDocCompletionById(Long id)
    {
        return docCompletionMapper.deleteDocCompletionById(id);
    }
}
